using System;
using System.Runtime.Serialization;
namespace Net35.Xrm.Sdk
{
	[DataContract(Name = "OptionSetValue", Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts")]
	public sealed class OptionSetValue : IExtensibleDataObject
	{
		private int _value;
		private ExtensionDataObject _extensionDataObject;
		[DataMember]
		public int Value
		{
			get
			{
				return this._value;
			}
			set
			{
				this._value = value;
			}
		}
		public ExtensionDataObject ExtensionData
		{
			get
			{
				return this._extensionDataObject;
			}
			set
			{
				this._extensionDataObject = value;
			}
		}
		public OptionSetValue()
		{
		}
		public OptionSetValue(int value)
		{
			this._value = value;
		}
		public override bool Equals(object obj)
		{
			OptionSetValue optionSetValue = obj as OptionSetValue;
			return optionSetValue != null && (this == optionSetValue || this._value.Equals(optionSetValue._value));
		}
		public override int GetHashCode()
		{
			return this._value.GetHashCode();
		}
	}
}
